In many modern computing designs a concept of privilege is used to define access to particular data and functions. For example, some computer processor designs utilize privilege rings wherein the most significant ring (typically ring 0) is reserved for the kernel. This level is at times called the supervisor or kernel mode. Subsequent rings (such as rings 1-3) are used for device drivers and/or applications (with applications belong to the least significant privileged level or ring). The least significant level is at times called the user mode. FIG. 1 illustrates an example of privilege rings.
While a processor (such as a CPU, GPU, APU, or some hybrid therefrom) may support several different levels that does not necessarily mean that the operating system will utilize all of the levels. For example, some Microsoft Windows versions only utilize the most and least significant levels.
When in the most significant privilege level, access to levels of lesser privilege significance should be done in a controlled fashion. In UNIX operating system environments, copyin and copyout functions are used for this purpose. For example, using copyin bytes of data are copied from the user space to the kernel space and the opposite occurs when copyout is used.